Sample adaptive offset scaling based on bit-depth

ABSTRACT

This disclosure provides systems, methods and apparatus for sample adaptive offset (SAO) scaling. For example, the apparatus may include a processor configured to determine an offset value for an SAO filter applied to video data to improve reconstruction of signal amplitudes in the video data. The processor may be further configured to determine a first value indicative of a bit depth and a second value indicative of a scale factor for the video data, to provide a scaled offset value based on applying the scale factor to the offset value, and to scale at least one color component of the video data according to the scaled offset value. The processor may also be configured to identify an edge offset category for a scaled group of neighboring pixel values, and to adjust the SAO filter based on the identified edge offset category.

CROSS-REFERENCE TO RELATED APPLICATION

This application claims priority under 35 U.S.C. § 119(e) to U.S.Provisional Application No. 61/809,852, filed Apr. 8, 2013, which ishereby expressly incorporated by reference herein.

TECHNICAL FIELD

This disclosure generally relates to video coding and more particularlyto sample adaptive offset (SAO) filtering in video coding processes,such as High Efficiency Video Coding (HEVC).

BACKGROUND

Digital video capabilities can be incorporated into a wide range ofdevices, including digital televisions, digital direct broadcastsystems, wireless broadcast systems, personal digital assistants (PDAs),laptop or desktop computers, tablet computers, e-book readers, digitalcameras, digital recording devices, digital media players, video gamingdevices, video game consoles, cellular or satellite radio telephones,so-called “smart phones,” video teleconferencing devices, videostreaming devices, and the like. Digital video devices implement videocompression techniques, such as those described in the standards definedby MPEG-2, MPEG-4, ITU-T H.263, ITU-T H.264/MPEG-4, Part 10, AdvancedVideo Coding (AVC), the High Efficiency Video Coding (HEVC) standardpresently under development, and extensions of such standards. The videodevices may transmit, receive, encode, decode, and/or store digitalvideo information more efficiently by implementing such videocompression techniques.

Video compression techniques perform spatial (intra-picture) predictionand/or temporal (inter-picture) prediction to reduce or removeredundancy inherent in video sequences. For block-based video coding, avideo slice (i.e., a video frame or a portion of a video frame) may bepartitioned into video blocks, which may also be referred to astreeblocks, coding units (CUs) and/or coding nodes. Video blocks in anintra-coded (I) slice of a picture are encoded using spatial predictionwith respect to reference samples in neighboring blocks in the samepicture. Video blocks in an inter-coded (P or B) slice of a picture mayuse spatial prediction with respect to reference samples in neighboringblocks in the same picture or temporal prediction with respect toreference samples in other reference pictures. Pictures may be referredto as frames, and reference pictures may be referred to a referenceframes.

Spatial or temporal prediction results in a predictive block for a blockto be coded. Residual data represents pixel differences between theoriginal block to be coded and the predictive block. An inter-codedblock is encoded according to a motion vector that points to a block ofreference samples forming the predictive block, and the residual dataindicating the difference between the coded block and the predictiveblock. An intra-coded block is encoded according to an intra-coding modeand the residual data. For further compression, the residual data may betransformed from the pixel domain to a transform domain, resulting inresidual transform coefficients, which then may be quantized. Thequantized transform coefficients, initially arranged in atwo-dimensional array, may be scanned in order to produce aone-dimensional vector of transform coefficients, and entropy coding maybe applied to achieve even more compression.

SUMMARY

The systems, methods, and devices of this disclosure each have severalinnovative aspects, no single one of which is solely responsible for thedesirable attributes disclosed herein. One aspect of this disclosureprovides an apparatus and method for video coding. The apparatuscomprises a memory unit configured to store video data. The apparatusfurther comprises a processor operationally coupled to the memory unit.The processor may be configured to determine an offset value for asample adaptive offset (SAO) filter applied to the video data to improvereconstruction of signal amplitudes in the video data. The processor maybe further configured to determine a first value indicative of a bitdepth and a second value indicative of a scale factor for the videodata. The processor may be further configured to provide a scaled offsetvalue based on applying the scale factor to the offset value, and toscale at least one color component of the video data according to thescaled offset value.

In related aspects, the processor may be configured to smooth blockedges associated with at least one block in the video data based onapplying a deblock filter to the at least one block of the video data.The processor may be further configured to scale a group of neighboringpixel values of the at least one block based at least in part on thescale factor applied to the offset value. The processor may be furtherconfigured to identify an edge offset category based at least in part onan edge shape of the scaled group, and to adjust an SAO filter based onthe identified edge offset category. In further related aspects, methodsperforming functions of the apparatus are also provided.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a block diagram illustrating an example video encoding anddecoding system that may utilize the sample adaptive offset filteringtechniques described in this disclosure.

FIG. 2 is a block diagram illustrating an example video encoder that mayimplement the sample adaptive offset filtering techniques described inthis disclosure.

FIG. 3 is a block diagram illustrating an example video decoder that mayimplement the sample adaptive offset filtering techniques described inthis disclosure.

FIG. 4 is a block diagram illustrating another example video encoderthat may implement the sample adaptive offset filtering techniquesdescribed in this disclosure.

FIG. 5 is a block diagram illustrating another example video decoderthat may implement the sample adaptive offset filtering techniquesdescribed in this disclosure.

FIG. 6 is an illustration showing example mapping curves between codedoffset values and scaled offset values according to various mappingmethods, in accordance with one or more aspects of this disclosure.

FIG. 7 is an illustration showing examples of four of edge categories.

FIG. 8 is a block diagram illustrating an example of a video encoderwith a pixel scaler, according to one or more aspects of thisdisclosure.

FIG. 9 is a block diagram illustrating an example of a video decoderwith a pixel scaler, according to one or more aspects of thisdisclosure.

FIG. 10 is a flow chart showing an exemplary method for SAO scaling, inaccordance with one or more aspects of this disclosure.

FIG. 11 is a flow chart showing an exemplary method for pixel valuescaling for edge offset categorization, in accordance with one or moreaspects of this disclosure.

DETAILED DESCRIPTION

The detailed description set forth below in connection with the appendeddrawings is intended as a description of exemplary embodiments of theinvention and is not intended to represent the only embodiments in whichthe invention may be practiced. The term “exemplary” used throughoutthis description means “serving as an example, instance, orillustration,” and should not necessarily be construed as preferred oradvantageous over other exemplary embodiments. The detailed descriptionincludes specific details for the purpose of providing a thoroughunderstanding of the exemplary embodiments of the invention. In someinstances, some devices are shown in block diagram form.

While for purposes of simplicity of explanation, the methodologies areshown and described as a series of acts, it is to be understood andappreciated that the methodologies are not limited by the order of acts,as some acts may, in accordance with one or more aspects, occur indifferent orders and/or concurrently with other acts from that shown anddescribed herein. For example, those skilled in the art will understandand appreciate that a methodology could alternatively be represented asa series of interrelated states or events, such as in a state diagram.Moreover, not all illustrated acts may be required to implement amethodology in accordance with one or more aspects.

High-Efficiency Video Coding (HEVC) is the international standard forvideo coding recently developed by the Joint Collaborative Team on VideoCoding (JCT-VC) of ITU-T WP3/16 and ISO/IEC JTC 1/SC 29/WG 11. HEVC usesan in-loop filter known as Sample Adaptive Offset (SAO), which isapplied after the deblocking filter. In SAO, an offset value is added toeach pixel according to the SAO type and category. SAO parameters,including type and offset values, can be signaled for each largestcoding unit (LCU) or coding tree unit (CTU). SAO type is signaled forluma and chroma separately, and the chroma SAO type is shared for Cb andCr components. Four offsets can be signaled for each color componentwithin an LCU or CTU.

In one approach to HEVC, the coded offset value range may depend on thebit-depth. The coded offset value range is [0, (1<<(Min(bitDepth,10)−5))−1], and sign value is separately coded. For example, the rangeis [0, 7] for 8 bit video, [0, 15] for 9 bit video, and [0, 31] forbit-depths of 10 and above.

In one implementation, the decoded offset value may be linearly scaledfor bit-depths greater than 10, as shown below.offset_scaled=offset_coded<<(bitDepth−10)

For example, when bit-depth is 12, each decoded offset value ismultiplied by 4 before being added to each pixel.

When lower bit-depth video is generated from higher bit-depth video,tone mapping is used, which can be either linear or non-linear. Eachcolor component can have different tone mapping. However, in certainimplementations, only a linear scaling is applied for all colorcomponents according to the bit-depth of each color component. This canlimit SAO performance and lead to coding efficiency loss, especially forthe video with bit-depth higher than 10 bit. Therefore, it is desirableto develop an offset scaling method/technique that can be changedaccording to the input sequence characteristics. This will allow SAO tofully show its efficiency to improve coding performance.

To mitigate or solve the problem, the present disclosure describes anoffset mapping process in which the decoded offset value may be scaledaccording to a set of scaling parameters. The scaling parameters mayinclude a scaling technique to choose among pre-defined mapping methods,including linear and non-linear scaling (the process of which may bereferred to as “non-linearly scaling”), and a scaling factor to controlmapping step size. Each color component (or group of color components)may have an independent scaling technique and a scaling factor. Anadvantage of this technique is that there is no need to change theentropy coding/decoding part, which may facilitate implementation ofthis technique on top of existing HEVC techniques or the like.

FIG. 1 is a block diagram illustrating an example video encoding anddecoding system 10 that may utilize the SAO techniques described in thisdisclosure. As shown in FIG. 1, system 10 includes a source device 12that generates encoded video data to be decoded at a later time by adestination device 14. Source device 12 and destination device 14 maycomprise any of a wide range of devices, including desktop computers,notebook (i.e., laptop) computers, tablet computers, set-top boxes,telephone handsets such as so-called “smart” phones, so-called “smart”pads, televisions, cameras, display devices, digital media players,video gaming consoles, video streaming device, or the like. In somecases, source device 12 and destination device 14 may be equipped forwireless communication.

Destination device 14 may receive the encoded video data to be decodedvia a link 16. Link 16 may comprise any type of medium or device capableof moving the encoded video data from source device 12 to destinationdevice 14. In one example, link 16 may comprise a communication mediumto enable source device 12 to transmit encoded video data directly todestination device 14 in real-time. The encoded video data may bemodulated according to a communication standard, such as a wirelesscommunication protocol, and transmitted to destination device 14. Thecommunication medium may comprise any wireless or wired communicationmedium, such as a radio frequency (RF) spectrum or one or more physicaltransmission lines. The communication medium may form part of apacket-based network, such as a local area network, a wide-area network,or a global network such as the Internet. The communication medium mayinclude routers, switches, base stations, or any other equipment thatmay be useful to facilitate communication from source device 12 todestination device 14.

Alternatively, encoded data may be output from output interface 22 to astorage device 31. Similarly, encoded data may be accessed from storagedevice 31 by input interface. Storage device 31 may include any of avariety of distributed or locally accessed data storage media such as ahard drive, Blu-ray discs, DVDs, CD-ROMs, flash memory, volatile ornon-volatile memory, or any other suitable digital storage media forstoring encoded video data. In a further example, storage device 31 maycorrespond to a file server or another intermediate storage device thatmay hold the encoded video generated by source device 12. Destinationdevice 14 may access stored video data from storage device 31 viastreaming or download. The file server may be any type of server capableof storing encoded video data and transmitting that encoded video datato the destination device 14. Example file servers include a web server(e.g., for a website), an FTP server, network attached storage (NAS)devices, or a local disk drive. Destination device 14 may access theencoded video data through any standard data connection, including anInternet connection. This may include a wireless channel (e.g., a Wi-Ficonnection), a wired connection (e.g., DSL, cable modem, etc.), or acombination of both that is suitable for accessing encoded video datastored on a file server. The transmission of encoded video data fromstorage device 31 may be a streaming transmission, a downloadtransmission, or a combination of both.

The techniques of this disclosure are not necessarily limited towireless applications or settings. The techniques may be applied tovideo coding in support of any of a variety of multimedia applications,such as over-the-air television broadcasts, cable televisiontransmissions, satellite television transmissions, streaming videotransmissions, e.g., via the Internet, encoding of digital video forstorage on a data storage medium, decoding of digital video stored on adata storage medium, or other applications. In some examples, system 10may be configured to support one-way or two-way video transmission tosupport applications such as video streaming, video playback, videobroadcasting, and/or video telephony.

In the example of FIG. 1, source device 12 includes a video source 18,video encoder 20 and an output interface 22. In some cases, outputinterface 22 may include a modulator/demodulator (modem) and/or atransmitter. In source device 12, video source 18 may include a sourcesuch as a video capture device, e.g., a video camera, a video archivecontaining previously captured video, a video feed interface to receivevideo from a video content provider, and/or a computer graphics systemfor generating computer graphics data as the source video, or acombination of such sources. As one example, if video source 18 is avideo camera, source device 12 and destination device 14 may formso-called camera phones or video phones. However, the techniquesdescribed in this disclosure may be applicable to video coding ingeneral, and may be applied to wireless and/or wired applications.

The captured, pre-captured, or computer-generated video may be encodedby video encoder 20. The encoded video data may be transmitted directlyto destination device 14 via output interface 22 of source device 12.The encoded video data may also (or alternatively) be stored ontostorage device 31 for later access by destination device 14 or otherdevices, for decoding and/or playback.

Destination device 14 includes an input interface 28, a video decoder30, and a display device 32. In some cases, input interface 28 mayinclude a receiver and/or a modem. Input interface 28 of destinationdevice 14 receives the encoded video data over link 16. The encodedvideo data communicated over link 16, or provided on storage device 31,may include a variety of syntax elements generated by video encoder 20for use by a video decoder, such as video decoder 30, in decoding thevideo data. Such syntax elements may be included with the encoded videodata transmitted on a communication medium, stored on a storage medium,or stored a file server.

Display device 32 may be integrated with, or external to, destinationdevice 14. In some examples, destination device 14 may include anintegrated display device and also be configured to interface with anexternal display device. In other examples, destination device 14 may bea display device. In general, display device 32 displays the decodedvideo data to a user, and may comprise any of a variety of displaydevices such as a liquid crystal display (LCD), a plasma display, anorganic light emitting diode (OLED) display, or another type of displaydevice.

Video encoder 20 and video decoder 30 may operate according to othervideo compression standards, including HEVC or the like. “HEVC WorkingDraft 9,” or WD9, is described in Bross et al., “High Efficiency VideoCoding (HEVC) text specification draft 9,” Joint Collaborative Team onVideo Coding (JCT-VC) of ITU-T SG16 WP3 and ISO/IEC JTC1/SC29/WG11, 11thMeeting: Shanghai, China, October, 2012, remains downloadable fromhttp://phenix.int-evry.fr/jct/doc_enduser/documents/11_Shanghai/wg11/JCTVC-K1003-v8.zip, the entire contentof which is incorporated herein by reference. The techniques of thisdisclosure, however, are not limited to any particular coding standardor technique.

Alternatively, video encoder 20 and video decoder 30 may operateaccording to other proprietary or industry standards, such as the ITU-TH.264 standard, alternatively referred to as MPEG-4, Part 10, AdvancedVideo Coding (AVC), or extensions of such standards. The techniques ofthis disclosure, however, are not limited to any particular codingstandard. Other examples of video compression standards include MPEG-2and ITU-T H.263.

Although not shown in FIG. 1, in some aspects, video encoder 20 andvideo decoder 30 may each be integrated with an audio encoder anddecoder, and may include appropriate MUX-DEMUX units, or other hardwareand software, to handle encoding of both audio and video in a commondata stream or separate data streams. If applicable, in some examples,MUX-DEMUX units may conform to the ITU H.223 multiplexer protocol, orother protocols such as the user datagram protocol (UDP).

Video encoder 20 and video decoder 30 each may be implemented as any ofa variety of suitable encoder circuitry, such as one or moremicroprocessors, digital signal processors (DSPs), application specificintegrated circuits (ASICs), field programmable gate arrays (FPGAs),discrete logic, software, hardware, firmware or any combinationsthereof. When the techniques are implemented partially in software, adevice may store instructions for the software in a suitable,non-transitory computer-readable medium and execute the instructions inhardware using one or more processors to perform the techniques of thisdisclosure. Each of video encoder 20 and video decoder 30 may beincluded in one or more encoders or decoders, either of which may beintegrated as part of a combined encoder/decoder (CODEC) in a respectivedevice.

The JCT-VC is working on development of the HEVC standard. The HEVCstandardization efforts are based on an evolving model of a video codingdevice referred to as the HEVC Test Model (HM). The UM presumes severaladditional capabilities of video coding devices relative to existingdevices according to, e.g., ITU-T H.264/AVC. For example, whereas H.264provides nine intra-prediction encoding modes, the UM may provide asmany as thirty-three intra-prediction encoding modes.

In general, the working model of the UM describes that a video frame orpicture may be divided into a sequence of coding tree units (CTUs), alsoreferred to as largest coding units (LCUs), that include both luma andchroma samples. A treeblock has a similar purpose as a macroblock of theH.264 standard. A slice includes a number of consecutive treeblocks incoding order. A video frame or picture may be partitioned into one ormore slices. Each treeblock may be split into coding units (CUs)according to a quadtree. For example, a treeblock, as a root node of thequadtree, may be split into four child nodes, and each child node may inturn be a parent node and be split into another four child nodes. Afinal, unsplit child node, as a leaf node of the quadtree, comprises acoding node, i.e., a coded video block. Syntax data associated with acoded bitstream may define a maximum number of times a treeblock may besplit, and may also define a minimum size of the coding nodes.

A CU includes a coding node and prediction units (PUs) and transformunits (TUs) associated with the coding node. A size of the CUcorresponds to a size of the coding node and is square in shape. Thesize of the CU may range from 8×8 pixels up to the size of the treeblockwith a maximum of 64×64 pixels or greater. Each CU may contain one ormore PUs and one or more TUs. Syntax data associated with a CU maydescribe, for example, partitioning of the CU into one or more PUs.Partitioning modes may differ between whether the CU is skip or directmode encoded, intra-prediction mode encoded, or inter-prediction modeencoded. PUs may be partitioned to be non-square in shape. Syntax dataassociated with a CU may also describe, for example, partitioning of theCU into one or more TUs according to a quadtree. A TU can be square ornon-square in shape.

The HEVC standard allows for transformations according to TUs, which maybe different for different CUs. The TUs are typically sized based on thesize of PUs within a given CU defined for a partitioned LCU, althoughthis may not always be the case. The TUs are typically the same size orsmaller than the PUs. In some examples, residual samples correspondingto a CU may be subdivided into smaller units using a quadtree structureknown as “residual quad tree” (RQT). The leaf nodes of the RQT may bereferred to as transform units (TUs). Pixel difference values associatedwith the TUs may be transformed to produce transform coefficients, whichmay be quantized.

In general, a PU includes data related to the prediction process. Forexample, when the PU is intra-mode encoded, the PU may include datadescribing an intra-prediction mode for the PU. As another example, whenthe PU is inter-mode encoded, the PU may include data defining a motionvector for the PU. The data defining the motion vector for a PU maydescribe, for example, a horizontal component of the motion vector, avertical component of the motion vector, a resolution for the motionvector (e.g., one-quarter pixel precision or one-eighth pixelprecision), a reference picture to which the motion vector points,and/or a reference picture list (e.g., List 0, List 1, or List C) forthe motion vector.

In general, a TU is used for the transform and quantization processes. Agiven CU having one or more PUs may also include one or more transformunits (TUs). Following prediction, video encoder 20 may calculateresidual values corresponding to the PU. The residual values comprisepixel difference values that may be transformed into transformcoefficients, quantized, and scanned using the TUs to produce serializedtransform coefficients for entropy coding. This disclosure typicallyuses the term “video block” to refer to a coding node of a CU. In somespecific cases, this disclosure may also use the term “video block” torefer to a treeblock, i.e., LCU, or a CU, which includes a coding nodeand PUs and TUs.

A video sequence typically includes a series of video frames orpictures. A group of pictures (GOP) generally comprises a series of oneor more of the video pictures. A GOP may include syntax data in a headerof the GOP, a header of one or more of the pictures, or elsewhere, thatdescribes a number of pictures included in the GOP. Each slice of apicture may include slice syntax data that describes an encoding modefor the respective slice. Video encoder 20 typically operates on videoblocks within individual video slices in order to encode the video data.A video block may correspond to a coding node within a CU. The videoblocks may have fixed or varying sizes, and may differ in size accordingto a specified coding standard.

As an example, the HM supports prediction in various PU sizes. Assumingthat the size of a particular CU is 2N×2N, the HM supportsintra-prediction in PU sizes of 2N×2N or N×N, and inter-prediction insymmetric PU sizes of 2N×2N, 2N×N, N×2N, or N×N. The HM also supportsasymmetric partitioning for inter-prediction in PU sizes of 2N×nU,2N×nD, nL×2N, and nR×2N. In asymmetric partitioning, one direction of aCU is not partitioned, while the other direction is partitioned into 25%and 75%. The portion of the CU corresponding to the 25% partition isindicated by an “n” followed by an indication of “Up”, “Down,” “Left,”or “Right.” Thus, for example, “2N×nU” refers to a 2N×2N CU that ispartitioned horizontally with a 2N×0.5N PU on top and a 2N×1.5N PU onbottom.

In this disclosure, “N×N” and “N by N” may be used interchangeably torefer to the pixel dimensions of a video block in terms of vertical andhorizontal dimensions, e.g., 16×16 pixels or 16 by 16 pixels. Ingeneral, a 16×16 block will have 16 pixels in a vertical direction(y=16) and 16 pixels in a horizontal direction (x=16). Likewise, an N×Nblock generally has N pixels in a vertical direction and N pixels in ahorizontal direction, where N represents a nonnegative integer value.The pixels in a block may be arranged in rows and columns. Moreover,blocks need not necessarily have the same number of pixels in thehorizontal direction as in the vertical direction. For example, blocksmay comprise N×M pixels, where M is not necessarily equal to N.

Following intra-predictive or inter-predictive coding using the PUs of aCU, video encoder 20 may calculate residual data for the TUs of the CU.The PUs may comprise pixel data in the spatial domain (also referred toas the pixel domain) and the TUs may comprise coefficients in thetransform domain following application of a transform, e.g., a discretecosine transform (DCT), an integer transform, a wavelet transform, or aconceptually similar transform to residual video data. The residual datamay correspond to pixel differences between pixels of the unencodedpicture and prediction values corresponding to the PUs. Video encoder 20may form the TUs including the residual data for the CU, and thentransform the TUs to produce transform coefficients for the CU.

Following any transforms to produce transform coefficients, videoencoder 20 may perform quantization of the transform coefficients.Quantization generally refers to a process in which transformcoefficients are quantized to possibly reduce the amount of data used torepresent the coefficients, providing further compression. Thequantization process may reduce the bit depth associated with some orall of the coefficients. For example, an n-bit value may be rounded downto an m-bit value during quantization, where n is greater than m.

In some examples, video encoder 20 may utilize a predefined scan orderto scan the quantized transform coefficients to produce a serializedvector that can be entropy encoded. In other examples, video encoder 20may perform an adaptive scan. After scanning the quantized transformcoefficients to form a one-dimensional vector, video encoder 20 mayentropy encode the one-dimensional vector, e.g., according to contextadaptive variable length coding (CAVLC), context adaptive binaryarithmetic coding (CABAC), syntax-based context-adaptive binaryarithmetic coding (SBAC), Probability Interval Partitioning Entropy(PIPE) coding or another entropy encoding methodology. Video encoder 20may also entropy encode syntax elements associated with the encodedvideo data for use by video decoder 30 in decoding the video data.

To perform CABAC, video encoder 20 may assign a context within a contextmodel to a symbol to be transmitted. The context may relate to, forexample, whether neighboring values of the symbol are non-zero or not.To perform CAVLC, video encoder 20 may select a variable length code fora symbol to be transmitted. Codewords in VLC may be constructed suchthat relatively shorter codes correspond to more probable symbols, whilelonger codes correspond to less probable symbols. In this way, the useof VLC may achieve a bit savings over, for example, using equal-lengthcodewords for each symbol to be transmitted. The probabilitydetermination may be based on a context assigned to the symbol.

In general, the addition of offset values to pixels in an LCU or othercoding unit may improve coding in some instances. For example, offsetvalues may be applied to pixels of a reconstructed video block in orderto compensate for illumination changes, quantization errors, or moregenerally, to make decoded video data more closely resemble originalvideo data. SAO techniques allow for different offset values to beapplied to different pixels (or blocks of pixels) depending on the pixelvalues of a pixel (or block). The offset value to be applied to a pixelcan be determined based on the value of a pixel. For example, if a pixelhas a value that is within a first band, then an offset associated withthe first band can be applied to the pixel. If the pixel has a valuethat is within a second band, then an offset associated with the secondband can be applied to the pixel, and so on for all bands.

In one type of SAO implementation, each partition (which consists of aset of LCUs) can have one of three offset types (also called pixelclassifications). The three offset types are no offset, bandclassification based offset type 0/1, and edge classification basedtypes EO0/EO1/EO2/EO3. EO0 classification SAO may include determining anedge index value for a current pixel, or component thereof, usingsurrounding pixels positioned to the right and left of the current pixel(also referred to herein as “horizontal surrounding” pixels). EO1classification SAO may include determining an edge index value for acurrent pixel, or component thereof, using surrounding pixels positionedabove and below the current pixel (also referred to herein as “verticalsurrounding” pixels). EO2 classification SAO may include determining anedge index value for a current pixel, or component thereof, usingsurrounding pixels positioned at the above left and below right of thecurrent pixel (also referred to herein as being positioned at negative45 degrees relative to the current pixel). EO3 classification SAO mayinclude determining an edge index value for a current pixel, orcomponent thereof, using surrounding pixels positioned at the aboveright and below left of the current pixel (also referred to herein asbeing positioned at 45 degrees relative to the current pixel).

As described in greater detail below, aspects of this disclosuregenerally relate to an offset mapping process in which the decodedoffset value is scaled according to a set of scaling parameters. Thetechniques of this disclosure may be performed by video encoder 20 orvideo decoder 30.

FIG. 2 is a block diagram illustrating an example video encoder 20 thatmay implement the SAO signaling techniques described in this disclosure.Video encoder 20 may perform intra- and inter-coding of video blockswithin video slices. Intra-coding relies on spatial prediction to reduceor remove spatial redundancy in video within a given video frame orpicture. Inter-coding relies on temporal prediction to reduce or removetemporal redundancy in video within adjacent frames or pictures of avideo sequence. Intra-mode (I mode) may refer to any of several spatialbased compression modes. Inter-modes, such as uni-directional prediction(P mode) or bi-prediction (B mode), may refer to any of severaltemporal-based compression modes.

In the example of FIG. 2, video encoder 20 includes a partitioning unit35, prediction processing unit 41, reference picture memory 64, summer50, transform processing unit 52, quantization unit 54, and entropyencoding unit 56. Prediction processing unit 41 includes motionestimation unit 42, motion compensation unit 44, and intra predictionprocessing unit 46. For video block reconstruction, video encoder 20also includes inverse quantization unit 58, inverse transform processingunit 60, and summer 62. Deblocking filter 72 may also be included tofilter block boundaries to remove blockiness artifacts fromreconstructed video. As shown in FIG. 2, video encoder 20 also includesadditional loop filters, including SAO filter 74 and an optionaladaptive loop filter (ALF) 76. Although deblocking filter 72 and SAOfilter 74, and optional ALF 76 are shown as being in-loop filters inFIG. 2, in some configurations deblocking filter 72, SAO filter 74, andoptional ALF 76 may be implemented as post-loop filters. Additionally,one or more of deblocking filter 72 and optional ALF 76 may be omittedin some implementations of the techniques of this disclosure. Inparticular, ALF 76 would be omitted in implementations for HEVC, sinceALF 76 does not exist in HEVC.

As shown in FIG. 2, video encoder 20 receives video data, andpartitioning unit 35 partitions the data into video blocks. Thispartitioning may also include partitioning into slices, tiles, or otherlarger units, as wells as video block partitioning, e.g., according to aquadtree structure of LCUs and CUs. Video encoder 20 generallyillustrates the components that encode video blocks within a video sliceto be encoded. The slice may be divided into multiple video blocks (andpossibly into sets of video blocks referred to as tiles). Predictionprocessing unit 41 may select one of a plurality of possible codingmodes, which may include a partition size, such as one of a plurality ofintra coding modes or one of a plurality of inter coding modes, for thecurrent video block based on error results (e.g., coding rate and thelevel of distortion). Prediction processing unit 41 may provide theresulting intra- or inter-coded block to summer 50 to generate residualblock data and to summer 62 to reconstruct the encoded block for use asa reference picture.

Intra prediction processing unit 46 within prediction processing unit 41may perform intra-predictive coding of the current video block relativeto one or more neighboring blocks in the same frame or slice as thecurrent block to be coded to provide spatial compression. Motionestimation unit 42 and motion compensation unit 44 within predictionprocessing unit 41 perform inter-predictive coding of the current videoblock relative to one or more predictive blocks in one or more referencepictures to provide temporal compression.

Motion estimation unit 42 may be configured to determine theinter-prediction mode for a video slice according to a predeterminedpattern for a video sequence. The predetermined pattern may designatevideo slices in the sequence as predicted slices (P slices),bi-direction predicted slices (B slices), or generalized PB slices (GPBslices). Motion estimation unit 42 and motion compensation unit 44 maybe highly integrated, but are illustrated separately for conceptualpurposes. Motion estimation, performed by motion estimation unit 42, isthe process of generating motion vectors, which estimate motion forvideo blocks. A motion vector, for example, may indicate thedisplacement of a PU of a video block within a current video frame orpicture relative to a predictive block within a reference picture.

A predictive block is a block that is found to closely match the PU ofthe video block to be coded in terms of pixel difference, which may bedetermined by sum of absolute difference (SAD), sum of square difference(SSD), or other difference metrics. In some examples, video encoder 20may calculate values for sub-integer pixel positions of referencepictures stored in reference picture memory 64. For example, videoencoder 20 may interpolate values of one-quarter pixel positions,one-eighth pixel positions, or other fractional pixel positions of thereference picture. Therefore, motion estimation unit 42 may perform amotion search relative to the full pixel positions and fractional pixelpositions and output a motion vector with fractional pixel precision.

Motion estimation unit 42 calculates a motion vector for a PU of a videoblock in an inter-coded slice by comparing the position of the PU to theposition of a predictive block of a reference picture. The referencepicture may be selected from a first reference picture list (List 0) ora second reference picture list (List 1), each of which identify one ormore reference pictures stored in reference picture memory 64. Motionestimation unit 42 sends the calculated motion vector to entropyencoding unit 56 and motion compensation unit 44.

Motion compensation, performed by motion compensation unit 44, mayinvolve fetching or generating the predictive block based on the motionvector determined by motion estimation, possibly performinginterpolations to sub-pixel precision. Upon receiving the motion vectorfor the PU of the current video block, motion compensation unit 44 maylocate the predictive block to which the motion vector points in one ofthe reference picture lists. Video encoder 20 forms a residual videoblock by subtracting pixel values of the predictive block from the pixelvalues of the current video block being coded, forming pixel differencevalues. The pixel difference values form residual data for the block,and may include both luma and chroma difference components. Summer 50represents the component or components that perform this subtractionoperation. Motion compensation unit 44 may also generate syntax elementsassociated with the video blocks and the video slice for use by videodecoder 30 in decoding the video blocks of the video slice.

Intra-prediction processing unit 46 may perform intra-prediction on acurrent block, as an alternative to the inter-prediction performed bymotion estimation unit 42 and motion compensation unit 44, as describedabove. In particular, intra-prediction processing unit 46 may determinean intra-prediction mode to use to encode a current block. In someexamples, intra-prediction processing unit 46 may encode a current blockusing various intra-prediction modes, e.g., during separate encodingpasses, and prediction processing unit 41 may select an appropriateintra-prediction or inter-prediction mode to use from the tested modes.For example, intra-prediction processing unit 46 may calculaterate-distortion values using a rate-distortion analysis for the varioustested intra-prediction modes, and select the intra-prediction modehaving the best rate-distortion characteristics among the tested modes.Rate-distortion analysis generally determines an amount of distortion(or error) between an encoded block and an original, unencoded blockthat was encoded to produce the encoded block, as well as a bit rate(that is, a number of bits) used to produce the encoded block.Intra-prediction processing unit 46 may calculate ratios from thedistortions and rates for the various encoded blocks to determine whichintra-prediction mode exhibits the best rate-distortion value for theblock.

In any case, after selecting an intra-prediction mode for a block,prediction processing unit 41 may provide information indicative of theselected intra-prediction mode for the block to entropy encoding unit56. Entropy encoding unit 56 may encode the information indicating theselected intra-prediction mode in accordance with the techniques of thisdisclosure. Video encoder 20 may include in the transmitted bitstreamconfiguration data, which may include a plurality of intra-predictionmode index tables and a plurality of modified intra-prediction modeindex tables (also referred to as codeword mapping tables), definitionsof encoding contexts for various blocks, and indications of a mostprobable intra-prediction mode, an intra-prediction mode index table,and a modified intra-prediction mode index table to use for each of thecontexts.

After prediction processing unit 41 generates the predictive block forthe current video block via either inter-prediction or intra-prediction,video encoder 20 forms a residual video block by subtracting thepredictive block from the current video block. The residual video datain the residual block may be included in one or more TUs and applied totransform processing unit 52. Transform processing unit 52 transformsthe residual video data into residual transform coefficients using atransform, such as a discrete cosine transform (DCT) or a conceptuallysimilar transform. Transform processing unit 52 may convert the residualvideo data from a pixel domain to a transform domain, such as afrequency domain.

Transform processing unit 52 may send the resulting transformcoefficients to quantization unit 54. Quantization unit 54 quantizes thetransform coefficients to further reduce bit rate. The quantizationprocess may reduce the bit depth associated with some or all of thecoefficients. The degree of quantization may be modified by adjusting aquantization parameter. In some examples, quantization unit 54 may thenperform a scan of the matrix including the quantized transformcoefficients. Alternatively, entropy encoding unit 56 may perform thescan.

Following quantization, entropy encoding unit 56 entropy encodes thequantized transform coefficients. For example, entropy encoding unit 56may perform context adaptive variable length coding (CAVLC), contextadaptive binary arithmetic coding (CABAC), syntax-based context-adaptivebinary arithmetic coding (SBAC), probability interval partitioningentropy (PIPE) coding or another entropy encoding methodology ortechnique. Following the entropy encoding by entropy encoding unit 56,the encoded bitstream may be transmitted to video decoder 30, orarchived for later transmission or retrieval by video decoder 30.Entropy encoding unit 56 may also entropy encode the motion vectors andthe other syntax elements for the current video slice being coded.

Inverse quantization unit 58 and inverse transform processing unit 60apply inverse quantization and inverse transformation, respectively, toreconstruct the residual block in the pixel domain for later use as areference block of a reference picture. Motion compensation unit 44 maycalculate a reference block by adding the residual block to a predictiveblock of one of the reference pictures within one of the referencepicture lists. Motion compensation unit 44 may also apply one or moreinterpolation filters to the reconstructed residual block to calculatesub-integer pixel values for use in motion estimation. Summer 62 addsthe reconstructed residual block to the motion compensated predictionblock produced by motion compensation unit 44 to produce a referenceblock for storage in reference picture memory 64.

Prior to storage in memory 64, the reconstructed residual block can befiltered by one or more filters. If desired, deblocking filter 72 mayalso be applied to filter the reconstructed residual blocks in order toremove blockiness artifacts. Other loop filters (either in the codingloop or after the coding loop) may also be used to smooth pixeltransitions, or otherwise improve the video quality. One example of sucha loop filter is SAO filter 74. The reference block may be used bymotion estimation unit 42 and motion compensation unit 44 as a referenceblock to inter-predict a block in a subsequent video frame or picture.

SAO filter 74 can determine offset values for SAO filtering in a mannerthat improves video coding quality. Improving video coding quality may,for example, involve determining offset values that make a reconstructedimage more closely match an original image. Video encoder 20 may, forexample, code the video data using multiple passes with different offsetvalues and choose, for inclusion in an encoded bitstream, the offsetvalues that offer a desirable coding quality, as determined based on arate-distortion calculation, for example.

In some configurations, SAO filter 74 may be configured to apply one ormore types of offset, such as edge offset described above. SAO filter 74may also at times apply no offset, which can itself be considered athird type of offset. The type of offset applied by SAO filter 74 may beeither explicitly or implicitly signaled to a video decoder. Whenapplying edge offset, pixels can be classified based on edgeinformation.

In some examples, as described in greater detail with respect to FIG. 4below, video encoder 20 may perform an offset mapping process in whichthe decoded offset value is scaled according to a set of scalingparameters.

Video encoder 20 of FIG. 2 represents an example of a video encoderconfigured to determine a first edge index, wherein the first edge indexcomprises an edge index for a luma component of a first surroundingpixel, determine a second edge index, wherein the second edge indexcomprises an edge index for a luma component of a second surroundingpixel, determine a third edge index based on the first edge index andthe second edge index, wherein the third edge index comprises an edgeindex for a chroma component of a current pixel, select an offset basedon the third edge index, and apply the offset to the chroma component ofthe current pixel.

FIG. 3 is a block diagram illustrating an example video decoder 30 thatmay implement the SAO techniques described in this disclosure. In theexample of FIG. 3, video decoder 30 includes an entropy decoding unit80, prediction processing unit 81, inverse quantization unit 86, inversetransformation unit 88, summer 90, and reference picture memory 92.Prediction processing unit 81 includes motion compensation unit 82, forinter-prediction decoding, and intra prediction processing unit 84, forintra-prediction decoding. Video decoder 30 may, in some examples,perform a decoding pass generally reciprocal to the encoding passdescribed with respect to video encoder 20 from FIG. 2.

During the decoding process, video decoder 30 receives an encoded videobitstream that represents video blocks of an encoded video slice andassociated syntax elements from video encoder 20. Entropy decoding unit80 of video decoder 30 entropy decodes the bitstream to generatequantized coefficients, motion vectors, and other syntax elements.Entropy decoding unit 80 forwards the motion vectors and other syntaxelements to prediction processing unit 81. Video decoder 30 may receivethe syntax elements at the video slice level and/or the video blocklevel.

When the video slice is coded as an intra-coded (I) slice, intraprediction processing unit 84 of prediction processing unit 81 maygenerate prediction data for a video block of the current video slicebased on a signaled intra prediction mode and data from previouslydecoded blocks of the current frame or picture. When the video frame iscoded as an inter-coded (e.g., B, P or GPB) slice, motion compensationunit 82 of prediction processing unit 81 produces predictive blocks fora video block of the current video slice based on the motion vectors andother syntax elements received from entropy decoding unit 80. Thepredictive blocks may be produced from one of the reference pictureswithin one of the reference picture lists. Video decoder 30 mayconstruct the reference frame lists, List 0 and List 1, using defaultconstruction techniques based on reference pictures stored in referencepicture memory 92.

Motion compensation unit 82 determines prediction information for avideo block of the current video slice by parsing the motion vectors andother syntax elements, and uses the prediction information to producethe predictive blocks for the current video block being decoded. Forexample, motion compensation unit 82 uses some of the received syntaxelements to determine a prediction mode (e.g., intra- orinter-prediction) used to code the video blocks of the video slice, aninter-prediction slice type (e.g., B slice, P slice, or GPB slice),construction information for one or more of the reference picture listsfor the slice, motion vectors for each inter-encoded video block of theslice, inter-prediction status for each inter-coded video block of theslice, and other information to decode the video blocks in the currentvideo slice.

Motion compensation unit 82 may also perform interpolation based oninterpolation filters. Motion compensation unit 82 may use interpolationfilters as used by video encoder 20 during encoding of the video blocksto calculate interpolated values for sub-integer pixels of referenceblocks. In this case, motion compensation unit 82 may determine theinterpolation filters used by video encoder 20 from the received syntaxelements and use the interpolation filters to produce predictive blocks.

Inverse quantization unit 86 inverse quantizes, i.e., de-quantizes, thequantized transform coefficients provided in the bitstream and decodedby entropy decoding unit 80. The inverse quantization process mayinclude use of a quantization parameter calculated by video encoder 20for each video block in the video slice to determine a degree ofquantization and, likewise, a degree of inverse quantization that shouldbe applied. Inverse transform processing unit 88 applies an inversetransform, e.g., an inverse DCT, an inverse integer transform, or aconceptually similar inverse transform process, to the transformcoefficients in order to produce residual blocks in the pixel domain.

After prediction processing unit 81 generates the predictive block forthe current video block based on the motion vectors and other syntaxelements, video decoder 30 forms a decoded video block by summing theresidual blocks from inverse transform processing unit 88 with thecorresponding predictive blocks generated by motion compensation unit82. Summer 90 represents the component or components that perform thissummation operation. The decoded video blocks formed by summer 90 maythen be filtered by a deblocking filter 93, SAO filter 94, and optionalALF 95. Optional ALF 95 represents an optional filter that may beexcluded from some implementations. It is noted that ALF 95 would beomitted in implementations for HEVC, since ALF 95 does not exist inHEVC. The decoded video blocks in a given frame or picture are thenstored in reference picture memory 92, which stores reference picturesused for subsequent motion compensation. Reference picture memory 92also stores decoded video for later presentation on a display device,such as display device 32 of FIG. 1.

In related aspects, SAO filter 94 can be configured to apply one or moreof the same filtering (e.g., edge offset and band offset) as SAO filter74 discussed above.

Video decoder 30 of FIG. 3 represents an example of a video decoderconfigured to determine a first edge index, wherein the first edge indexcomprises an edge index for a luma component of a first surroundingpixel, determine a second edge index, wherein the second edge indexcomprises an edge index for a luma component of a second surroundingpixel, determine a third edge index based on the first edge index andthe second edge index, wherein the third edge index comprises an edgeindex for a chroma component of a current pixel, select an offset basedon the third edge index, and apply the offset to the chroma component ofthe current pixel.

In accordance with one or more aspects of the present disclosure, FIGS.4 and 5 show block diagrams of an encoder and a decoder, respectively,with the bit-depth adaptive SAO offset scaler. The example encoder 400and decoder 500 shown in FIGS. 4 and 5 may be implemented alternativelyto, or in conjunction with video encoder 20 of FIG. 2 or video decoder30 of FIG. 3 described above.

With reference to FIG. 4, the encoder 400 may include variouscomponents, such as a prediction processing unit 410 that receivesimage/video data. The prediction processing unit 410 may be operativelycoupled to a transform/quantization unit 412, which is operativelycoupled to both an entropy encoder 414 and a dequantization/inversetransform unit 416 as shown. The entropy encoder 414 may provide anencoded video bitstream. The inverse transform unit 416 may beoperatively coupled to a prediction compensator 418, which isoperatively coupled to a deblock filter 420, which is operativelycoupled to both an SAO filter 428 and an SAO parameter estimator 422.The SAO parameter estimator 422 may be operatively coupled to an offsetdown-scaler 424, which is coupled to both the entropy encoder 414 and anoffset up-scaler 426. The offset up-scaler 426 may be operativelycoupled to the SAO filter 428, which is operatively to reference picturememory 430, which is in turn operatively coupled to the predictionprocessing unit 410.

It is noted that many of the components of the encoder 400 correspond tothe components of the encoder 20 described above with reference to FIG.2. In the example of the encoder 400 in FIG. 4, however, the SAOparameter estimator 422 works in conjunction with the offset down-scaler424 and the offset up-scaler 426 to scale down the estimated offsetvalue, and then scale up the estimated offset value, before the applyingthe estimated offset value to each pixel to avoid mismatch with adecoder (e.g., the decoder 500 of FIG. 5).

With reference to FIG. 5, the decoder 500 may include variouscomponents, such as an entropy decoding unit 510 that receives a encodedvideo bitstream. The entropy decoding unit 510 may be operativelycoupled to an offset up-scaler 512 and a dequantization/inversetransform unit 514. The offset up-scaler 512 may be operatively coupledto an SAO filter 520. The inverse transform unit 514 may be coupled to aprediction compensation unit 516, which is operatively coupled to adeblock filter 518, which is operatively coupled to the SAO filter 520as shown. The SAO filter 520 may provide the decoded image/video dataand may be operatively coupled to a memory unit 522, which isoperatively coupled to the prediction compensation unit 516 as shown.

While many of the components of the decoder 500 correspond to thecomponents of the decoder 30 described above with reference to FIG. 3,the arrangement and configuration relative to neighboring components isdifferent. Further, in the example of the decoder 500 of FIG. 5, thereis included the offset up-scaler 512 in communication with the SAOfilter 520. It is again noted that, in the examples shown in FIGS. 4 and5, at the encoder 400 side, the estimated offset value is first scaleddown and then scaled up before applied to each pixel to avoid mismatchwith the decoder 500. Examples of offset scaling based on bit-depth areprovided below.

In one example, linear scaling with flexible scaling factor for eachcolor component may be performed by the encoder and/or the decoder(e.g., the SAO parameter estimator 422, the offset down-scaler 424, andthe offset up-scaler 426 of the encoder 400 in FIG. 4, and/or the offsetup-scaler 512 in FIG. 5). For example, the coded/decoded offset value isscaled linearly as in HEVC but with the specified scale factor as below.The scale factor can be different for each color component (or group ofcolor components, i.e., one for luma and another for chroma).offset_scaled=offset_coded<<scale_factor

In another embodiment, the HEVC functionoffset_scaled=offset_coded<<(bitDepth−Min(bitDepth,10))is applied to the chroma components, while a separate scale factor isused for the luma component, where the scale factor can be eithersignaled explicitly or can be fixed for the given bit-depth.

In another example, non-linear scaling with flexible scaling factor foreach color component may be performed by the encoder and/or the decoder.The coded/decoded offset value is scaled in a non-linear way. TheC-style code below illustrates how this non-linear mapping can beimplemented.

offset_ scaled = 0; for( Int i = 0; i < offset_coded; i++ ) { offset_scaled += 1 << ( (i>>3) + (scale_factor −1) ); }where << and >> are the left and right bit-shift operators,respectively.

It is noted that the loop in the above example may be combined with theentropy decoding procedure of “offset_coded”, which can further reducecomputational complexity. Table 1 below shows the coded/decoded offsetvalues and scaled offset values according to this example whenscale_factor=2.

TABLE 1 Mapping of coded offset value and scaled offset value usingnon-linear mapping with scale factor of 1 and 2. offset_ scaled offset_scaled offset_coded scale_factor = 1 scale_factor = 2 0 0 0 1 1 2 2 2 43 3 6 4 4 8 5 5 10 6 6 12 7 7 14 8 8 16 9 10 20 10 12 24 11 14 28 12 1632 13 18 36 14 20 40 15 22 44 16 24 48 17 28 56 18 32 64 19 36 72 20 4080 21 44 88 22 48 96 23 52 104 24 56 112 25 72 128 26 88 144 27 104 16028 120 176 29 136 192 30 152 208 31 168 224

As shown above and with reference to FIG. 6, non-linear mapping can beperformed using simple shift and addition operations. To fully reflecttone-mapping characteristics, one may use a table mapping, in which atable contains one-to-one mapping of coded/decoded offset value andscaled offset value. Other non-linear mappings may also be implemented.

For instance, as shown in FIG. 6, a piece-wise linear mapping may beused in which each part of the mapping is linear with different slope.For example, the linear equation with scale_factor of 1 may be used whenthe “offset_coded” is less than 8 (trace 100 in FIG. 6), andscale_factor of 2 (trace 104 in FIG. 6) may be used otherwise.

In another example, a combination of linear and non-linear scaling maybe performed by the encoder and/or decoder. For example, it is possibleto choose a specific scaling technique and scaling factor for a givenbit-depth and a given color component. For example, when the bit-depthis larger than 10, a non-linear scaling approach specified above may beapplied to luma component with scaling factor of 2, while a linearscaling may be applied to chroma components with scaling factor of 2.

The scaling technique and scaling factor for each color component (orgroup of color components) may be signaled explicitly. For example,these parameters may be signaled at the level of a sequence parameterset (SPS), a picture parameter set (PPS), slice header or LCU/CTU. Forbackward compatibility with HEVC working draft version 1, in oneexample, such approaches may be applied when the bit-depth is largerthan 10.

In some instances, non-scaling may be performed. For example, theabove-described linear scaling technique with scale factor 0 may meannon-scaling. In such a case, the value of the coded/decoded offset valuemay be exactly the same with the offset value applied to each pixel. Inone example, the offset value range may not change. In another example,the offset value range may be increased to cover offset values with alarge magnitude (e.g., an offset value that exceeds a defined orthreshold magnitude value). In some instances, non-scaling may beapplied only to the luma component, while linear scaling (e.g., asspecified in HEVC or the like) may be applied to the chroma component.In other instances, non-scaling may be applied to both the luma andchroma components.

In some examples, pixel value scaling for edge offset categorization maybe performed. In such an approach, the SAO offset may be scaledaccording to one of the examples described above, and additionally thepixel value after the deblock filter may be scaled similarly as the SAOoffset to determine an edge offset category.

In HEVC, five edge categories may be defined according to an edge shape.FIG. 7 illustrates four of the edge categories (i.e., the four edgeshapes on the top line), whereas other edge shapes not falling into oneof these four categories (e.g., the two edge shapes on the bottom line)may be classified under “other” category (category 0).

To determine an edge category, the neighboring pixels may be compared tocheck or determine the edge shape. As one example, the neighboringpixels may be compared to one another, or to a current pixel, to checkwhether a determined edge shape is accurate. In such an approach, thecurrent pixel and the neighboring pixels may be scaled in a mannersimilar to scaling of the SAO offset. For example, when bit-depth islarger than 10, the current pixel and the neighboring pixels may bescaled down linearly asp′=p>>(bitDepth−Min(bitDepth,10))where p is the pixel value after deblock filtering. It is noted that p′is used to determine the edge offset category and that the offset valueis added to p. Similar operation(s) may be performed when non-linearscaling is implemented.

The example video encoder 800 shown in FIG. 8 and video decoder 900shown in FIG. 9 may be used to carry out the pixel scaling operationsdescribed above. FIG. 8 provides a block diagram illustrating an exampleof the video encoder 800 with a pixel scaler 822, according to aspectsof this disclosure. In one implementation, the pixel scaler 822 may beoperatively coupled to a deblock filter 820 and an SAO filter 830 asshown. It is noted that the components of the encoder 800, other thanthe pixel scaler 822, shown in FIG. 8 are the same as the components ofthe encoder 400 of FIG. 4. It is further noted that the component(s) ofthe encoder 800 may be arranged slightly differently, and the pixelscaler 822 may be in direct or indirect communication with othercomponent(s) of the encoder 800.

FIG. 9 provides a block diagram illustrating an example of the videodecoder 900 with a pixel scaler 920, according to aspects of thisdisclosure. In one implementation, the pixel scaler 920 may beoperatively coupled to a deblock filter 918 and an SAO filter 922 asshown. It is noted that the components of the decoder 900, other thanthe pixel scaler 920, shown in FIG. 9 are the same as the components ofthe decoder 500 of FIG. 5. It is further noted that the component(s) ofthe decoder 900 may be arranged slightly differently, and the pixelscaler 918 may be in direct or indirect communication with othercomponent(s) of the decoder 900.

In some instances, the video encoder 800 and the video decoder 900 shownin FIGS. 8 and 9, respectively, or variations thereof, may be used inconjunction with or in lieu of the other example encoders/decoders, orcomponents thereof, described in this disclosure. For example,components of the video encoder shown in FIG. 9 (e.g., the pixel scaler822, the SAO parameter estimator 824, the offset down-scaler 826, andthe offset up-scaler 828) may be implemented with video encoder 20 ofFIG. 2 to carry out the techniques of this disclosure. Likewise, one ormore components of the video decoder shown in FIG. 9 (e.g., the pixelscaler 920 and the offset up-scaler 912) may be used in conjunction withvideo decoder 30 of FIG. 3 to carry out the techniques of thisdisclosure.

As described in this disclosure, “video coding” may refer to videoencoding and/or video decoding. Moreover, a “video coder” may refer to avideo encoder (such as video encoder 20, 400, 800, or variationsthereof) or a video decoder (such as video decoder 30, 500, 900, orvariations thereof), as applicable.

FIG. 10 is a flowchart illustrating a method 1000 for SAO scaling,according to one or more aspects of the present disclosure. The stepsillustrated in FIG. 10 may be performed by a video coder, such as, forexample, a video encoder (e.g., encoder 400 in FIG. 4 or encoder 800 inFIG. 8), a video decoder (e.g., decoder 500 in FIG. 5 or decoder 900 inFIG. 9), or component(s) thereof.

In one approach, the method 1000 may involve, at block 1010, determiningan offset value for an SAO filter applied to the video data to improvereconstruction of signal amplitudes in the video data. Block 1010 mayinvolve receiving the offset value that is signaled at a level of a CTUor the like.

The method 1000 may further involve, at block 1020, determining a firstvalue indicative of a bit depth and a second value indicative of a scalefactor for the video data. Block 1020 may involve receiving the secondvalue indicative of the scale factor that is associated with at leastone picture of the video data, the second value being signaled at alevel of a PPS or the like. In the alternative, or in addition, block1020 may involve receiving the first value indicative of the bit depththat is associated with a sequence of pictures of the video data.

The method 1000 may further involve, at block 1030, providing a scaledoffset value based on applying the scale factor to the offset value.Block 1030 may involve providing the scaled offset value by non-linearlyscaling the offset value based at least in part on the scale factor. Inthe alternative, or in addition, block 1030 may involve determiningwhether to scale the at least one color component either linearly ornon-linearly, based at least in part on a given bit-depth associatedwith the at least one color component.

In one example, block 1030 may involve determining whether to scale afirst group and a second group of color components either linearly ornon-linearly, based on a first bit-depth and a second bit-depthassociated with the first and second groups, respectively. Block 1030may further involve scaling the at least one color component by:linearly scaling a first group of color components of the video dataaccording to a first scaled offset value; and non-linearly scaling asecond group of color components of the video data according to a secondscaled offset value.

The method 1000 may further involve, at block 1040, scaling at least onecolor component of the video data according to the scaled offset value.Block 1040 may involve scaling the at least one color component thatcomprises one of a luma value or at least one chroma value associatedwith a block of the video data.

In one embodiment, where the method 1000 is performed by a videodecoder, blocks 1010, 1020, and/or 1030 may be performed by the entropydecoding unit 510 of the decoder 500 in FIG. 5 (or the entropy decodingunit 910 of the decoder 900 in FIG. 9). The entropy decoding unit 510may be configured to perform blocks 1010, 1020, and/or 1030 by operatingin conjunction with other component(s) of the decoder 500, such as, forexample, the prediction compensation unit 516, the deblock filter 518,and/or the SAO filter 520, or subcomponent(s) thereof. Block 1040 may beperformed by the offset up-scaler 512 or the like, alone or inconjunction with the other component(s) of the decoder 500, such as, forexample, the deblock filter 518, entropy decoding unit 510, and/or theSAO filter 520, or subcomponent(s) thereof.

For example, the entropy decoding unit 510 may be configured to performblock 1010 by receiving an encoded offset value for the SAO filter 520applied to the video data to improve reconstruction of signal amplitudesor the like in the video data. The entropy decoding unit 510 may beconfigured to perform block 1020 by determining a first value indicativeof a bit depth and a second value indicative of a scale factor for thevideo data, and by providing a decoded offset value based on entropydecoding the encoded offset value. The entropy decoding unit 510 may beconfigured to perform block 1030 by providing a scaled offset value orthe like based on applying the scale factor to the decoded offset value.The offset up-scaler 512 may be configured to perform block 1040 byscaling at least one color component of the video data according to thescaled offset value or variation thereof.

In another embodiment, where the method 1000 is performed by a videoencoder, blocks 1010, 1020, and/or 1030 may be performed by the SAOparameter estimator 422 of the encoder 400 in FIG. 4 (or the SAOparameter estimator 824 of the encoder 800 in FIG. 8). The SAO parameterestimator 422 may be configured to perform blocks 1010, 1020, and/or1030 by operating in conjunction with other component(s) of the encoder400, such as, for example, the entropy coder 414, the deblock filter420, the prediction compensator 418, and/or the SAO filter 428, orsubcomponent(s) thereof. Block 1040 may be performed by the offsetdown-scaler 424 and the offset up-scaler 426. The offset down-scaler 424and/or the offset up-scaler 426 may be configured to perform block 1040by operating in conjunction with other component(s) of the encoder 400,such as, for example, the entropy coder 414, the deblock filter 420, theSAO parameter estimator 422 and/or the SAO filter 428, orsubcomponent(s) thereof.

For example, the SAO parameter estimator 422 may be configured toperform block 1010 by determining an offset value for the SAO filter 428applied to the video data to improve reconstruction of signal amplitudesor the like in the video data. The SAO parameter estimator 422 may beconfigured to perform block 1020 by generating a first value indicativeof a bit depth and a second value indicative of a scale factor for thevideo data, and by providing an encoded offset value based on entropyencoding the offset value. The SAO parameter estimator 422 may beconfigured to perform block 1030 by providing a scaled offset value orthe like based on applying the scale factor to the encoded offset value.The offset down-scaler 424 and the offset up-scaler 426 may beconfigured to perform block 1040 by scaling at least one color componentof the video data according to the scaled offset value or variationthereof.

FIG. 11 provides a flowchart illustrating a method 1100 for pixel valuescaling for edge offset categorization that may be performed inconjunction with or independently of the method 1100, according to oneor more aspects of the present disclosure. The steps illustrated in FIG.11 may be performed by a video coder, such as, for example, a videoencoder (e.g., encoder 800 in FIG. 8), a video decoder (e.g., decoder900 in FIG. 9), or component(s) thereof.

In one approach, the method 1100 may involve, at block 1110, smoothingblock edges associated with at least one block in the video data basedon applying a deblock filter to the at least one block of the videodata. The method 1100 may further involve, at block 1120, scaling agroup of neighboring pixel values of the at least one block based atleast in part on the scale factor applied to the offset value. Themethod 1100 may further involve, at block 1130, identifying an edgeoffset category based at least in part on an edge shape of the scaledgroup. The method 1100 may further involve, at block 1140, adjusting theSAO filter based on the identified edge offset category.

In related aspects, there is provided an apparatus for video coding thatincludes a memory unit configured to store video data. The apparatus mayinclude at least one processor in communication with the memory, whereinthe at least one processor may be configured to perform blocks 1010,1020, 1030, and/or 1040 in FIG. 10. In the alternative, or in addition,the at least one processor may be configured to perform blocks 1110,1120, 1130, and/or 1140 in FIG. 11.

In further related aspects, the at least one processor of the apparatusmay include a standalone processor and/or subcomponent processor(s)included within one or more component(s) of a video decoder (e.g.,decoder 500 or 900) and/or a video encoder (e.g., encoder 400 or 800).The memory unit of the apparatus may be specifically configured forprocessing video data. For example, the memory unit may include one ormore solid state drives (SSDs) and/or flash memory component(s) ofsufficient size and speed to process, store, and retrieve video data,without slowing down the video coding process. In one implementation,the memory unit may include a memory multiplexing component, atwo-dimensional cache unit, or the like to expedite the processing ofvideo data by the memory unit.

In one or more examples, the functions described may be implemented inhardware, software, firmware, or any combination thereof. If implementedin software, the functions may be stored on or transmitted over, as oneor more instructions or code, a computer-readable medium and executed bya hardware-based processing unit. Computer-readable media may includecomputer-readable storage media, which corresponds to a tangible mediumsuch as data storage media, or communication media including any mediumthat facilitates transfer of a computer program from one place toanother, e.g., according to a communication protocol. In this manner,computer-readable media generally may correspond to (1) tangiblecomputer-readable storage media which is non-transitory or (2) acommunication medium such as a signal or carrier wave. Data storagemedia may be any available media that can be accessed by one or morecomputers or one or more processors to retrieve instructions, codeand/or data structures for implementation of the techniques described inthis disclosure. A computer program product may include acomputer-readable medium.

By way of example, and not limitation, such computer-readable storagemedia can comprise RAM, ROM, EEPROM, CD-ROM or other optical diskstorage, magnetic disk storage, or other magnetic storage devices, flashmemory, or any other medium that can be used to store desired programcode in the form of instructions or data structures and that can beaccessed by a computer. Also, any connection is properly termed acomputer-readable medium. For example, if instructions are transmittedfrom a website, server, or other remote source using a coaxial cable,fiber optic cable, twisted pair, digital subscriber line (DSL), orwireless technologies such as infrared, radio, and microwave, then thecoaxial cable, fiber optic cable, twisted pair, DSL, or wirelesstechnologies such as infrared, radio, and microwave are included in thedefinition of medium. It should be understood, however, thatcomputer-readable storage media and data storage media do not includeconnections, carrier waves, signals, or other transient media, but areinstead directed to non-transient, tangible storage media. Disk anddisc, as used herein, includes compact disc (CD), laser disc, opticaldisc, digital versatile disc (DVD), floppy disk and Blu-ray disc, wheredisks usually reproduce data magnetically, while discs reproduce dataoptically with lasers. Combinations of the above should also be includedwithin the scope of computer-readable media.

Instructions may be executed by one or more processors, such as one ormore digital signal processors (DSPs), general purpose microprocessors,application specific integrated circuits (ASICs), field programmablelogic arrays (FPGAs), or other equivalent integrated or discrete logiccircuitry. Accordingly, the term “processor,” as used herein may referto any of the foregoing structure or any other structure suitable forimplementation of the techniques described herein. In addition, in someaspects, the functionality described herein may be provided withindedicated hardware and/or software modules configured for encoding anddecoding, or incorporated in a combined codec. Also, the techniquescould be fully implemented in one or more circuits or logic elements.

The techniques of this disclosure may be implemented in a wide varietyof devices or apparatuses, including a wireless handset, an integratedcircuit (IC) or a set of ICs (e.g., a chip set). Various components,modules, or units are described in this disclosure to emphasizefunctional aspects of devices configured to perform the disclosedtechniques, but do not necessarily require realization by differenthardware units. Rather, as described above, various units may becombined in a codec hardware unit or provided by a collection ofinteroperative hardware units, including one or more processors asdescribed above, in conjunction with suitable software and/or firmware.Various examples have been described. These and other examples arewithin the scope of the following claims.

What is claimed is:
 1. An apparatus for video decoding, comprising: amemory unit configured to store video data reconstructed based on anencoded video bitstream that includes a plurality of color components; aprocessor in communication with the memory unit, the processorconfigured to: decode, from the encoded video bitstream, an offset valuefor a sample adaptive offset (SAO) filter applied to the reconstructedvideo data, wherein the offset value is within a first range of offsetvalues; decode, from a picture parameter set (PPS) of the encoded videobitstream, a first value indicative of a first scale factor for a firstchroma component of the reconstructed video data, the first scale factorbeing different than a second scale factor for a first luma component ofthe reconstructed video data; apply a non-linear function to the offsetvalue to provide a scaled offset value based on applying the first scalefactor to the offset value, wherein the scaled offset value is within asecond range of offset values, and wherein the second range of offsetvalues comprises more values than the first range of offset values;generate a filtered chroma component via adding the scaled offset valueto the first chroma component of the reconstructed video; and decode thereconstructed video data according to the filtered chroma component. 2.The apparatus of claim 1, wherein the processor is further configured todecode the offset value that is encoded at a level of a coding tree unit(CTU).
 3. The apparatus of claim 1, wherein the processor is furtherconfigured to decode a second value indicative of the scale factor, thesecond value being encoded in the PPS.
 4. The apparatus of claim 1,wherein the processor is further configured to decode a third valueindicative of a bit depth that is associated with a sequence of picturesof the video data.
 5. The apparatus of claim 1, wherein the processor isfurther configured to apply the non-linear function to provide thescaled offset value based on non-linearly scaling the offset value basedat least in part on the first scale factor.
 6. The apparatus of claim 1,wherein the processor is further configured to determine to scale theoffset value non-linearly, based at least in part on a given bit-depthassociated with the first chroma component.
 7. The apparatus of claim 1,wherein the processor is further configured to determine whether toscale a first group and a second group of color components eitherlinearly or non-linearly, based on a first bit-depth and a secondbit-depth associated with the first and second groups, respectively. 8.The apparatus of claim 7, wherein the processor is further configured togenerate a plurality of scaled color components based on: linearlyscaling a first offset value of a first group of color components of thereconstructed video data according to a third scale factor; andnon-linearly scaling a second offset value of a second group of colorcomponents of the reconstructed video data according to a fourth scalefactor.
 9. The apparatus of claim 1, wherein the processor is furtherconfigured to: smooth block edges associated with at least one block inthe video data based on applying a deblock filter to the at least oneblock of the reconstructed video data; add the scaled offset value to agroup of neighboring pixel values of the at least one block based atleast in part on the first scale factor applied to the offset value;identify an edge offset category based at least in part on an edge shapeof the scaled group; and adjust the SAO filter based on the identifiededge offset category.
 10. A method of decoding video data that includesa plurality of color components, the method comprising: decoding, froman encoded video bitstream, an offset value for a sample adaptive offset(SAO) filter applied to video data reconstructed based on the encodedvideo bitstream, wherein the offset value is within a first range ofoffset values; decoding, from a picture parameter set (PPS) of theencoded video bitstream, a first value indicative of a first scalefactor for a first chroma component of the reconstructed video data, thefirst scale factor being different than a second scale factor for afirst luma component of the reconstructed video data; applying anon-linear function to the offset value to provide a scaled offset valuebased on applying the first scale factor to the offset value, whereinthe scaled offset value is within a second range of offset values, andwherein the second of range of offset values comprises more values thanthe first range of offset values; generating a filtered chroma componentvia adding the scaled offset value to the first chroma component of thereconstructed video data; and decoding the reconstructed video dataaccording to the filtered chroma component.
 11. The method of claim 10,further comprising decoding the offset value that is encoded at a levelof a coding tree unit (CTU).
 12. The method of claim 10, furthercomprising decoding a second value indicative of the second scalefactor, the second value being encoded in the PPS.
 13. The method ofclaim 10, further comprising: smoothing block edges associated with atleast one block in the video data based on applying a deblock filter tothe at least one block of the video data; adding the scaled offset valueto a group of neighboring pixel values of the at least one block basedat least in part on the first scale factor applied to the offset value;identifying an edge offset category based at least in part on an edgeshape of the scaled group; and adjusting the SAO filter based on theidentified edge offset category.
 14. A non-transitory computer readablemedium comprising code that, when executed, causes an apparatus toperform a process comprising: decoding, from an encoded video bitstream,an offset value for a sample adaptive offset (SAO) filter applied tovideo data reconstructed based on the encoded video bitstream, whereinthe offset value is within a first range of offset values; decoding,from a picture parameter set (PPS) of the encoded video bitstream, afirst value indicative of a first scale factor for a first chromacomponent of the reconstructed video data, the first scale factor beingdifferent than a second scale factor for a first luma component of thereconstructed video data; applying a non-linear function to the offsetvalue to provide a scaled offset value based on applying the first scalefactor to the offset value, wherein the scaled offset value is within asecond range of offset values, and wherein the second range of offsetvalues comprises more values than the first range of offset values;generating a filtered chroma component via adding the scaled offsetvalue to the first chroma component of the reconstructed video data; anddecoding the reconstructed video data according to the filtered chromacomponent.